Skip to content

Research: stream stability geometry and recovery telemetry#79

Merged
mrmidi merged 1 commit into
mainfrom
codex/research-stream-stability
Jul 19, 2026
Merged

Research: stream stability geometry and recovery telemetry#79
mrmidi merged 1 commit into
mainfrom
codex/research-stream-stability

Conversation

@mrmidi

@mrmidi mrmidi commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Research scope

Captures the Duet/Focusrite stream-stability investigation so contributors can review the cursor, replay, and recovery assumptions together.

What changed

  • Adds CoreAudio write-frontier → TX-preparation signalling and telemetry.
  • Adds compact MCP-ring fault records, including the precise RxSequenceReplayReader::TryRead() rejection reason.
  • Adds a TX data-horizon burst simulator and updates buffer-geometry verification.
  • Documents the observed cursor invariants, replay-horizon failure, FW-64 callback overwrite, and unsafe recovery escalation.

Current conclusion

This is intentionally research, not merge-ready. The 400-cycle TX preparation experiment survives scheduler bursts in simulation, but it incorrectly consumes a finite historical RX replay ring as future TX timing. That can produce NODATA, TxAlign jumps, clicks, and silence even while DMA/SYT remain alive.

The PR also identifies two recovery defects introduced by FW-64:

  • AV/C overwrites DICE's single timing-loss callback.
  • AV/C may restart transport without quiescing/re-priming CoreAudio's TX producer under the same epoch.

Validation

  • ./build.sh --no-bump (Debug build)
  • python3 tools/tx_data_horizon_burst_sim.py suite
  • python3 tools/buffer_geometry_verify.py verify --max-io 1024
  • git diff --check

The local Xcode scheme rewrite is intentionally excluded.

@mrmidi
mrmidi marked this pull request as ready for review July 19, 2026 07:13
@mrmidi

mrmidi commented Jul 19, 2026

Copy link
Copy Markdown
Owner Author

NOTE, I'm merging it, but currently streaming stability is broken for all devices/backends. If I couldn't resolve it - I will roll back to some working commit.

@mrmidi
mrmidi merged commit 9055449 into main Jul 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant